home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Temático 40 Febrero 2004.iso / DOS / testdisk / src / swap.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-01-02  |  1.5 KB  |  44 lines

  1. /*
  2.  
  3.     file: swap.h
  4.  
  5.     Copyright (C) 1998-2004 Christophe GRENIER <grenier@cgsecurity.org>
  6.   
  7.     this software is free software; you can redistribute it and/or modify
  8.     it under the terms of the gnu general public license as published by
  9.     the free software foundation; either version 2 of the license, or
  10.     (at your option) any later version.
  11.   
  12.     this program is distributed in the hope that it will be useful,
  13.     but without any warranty; without even the implied warranty of
  14.     merchantability or fitness for a particular purpose.  see the
  15.     gnu general public license for more details.
  16.   
  17.     you should have received a copy of the gnu general public license
  18.     along with this program; if not, write to the free software
  19.     foundation, inc., 675 mass ave, cambridge, ma 02139, usa.
  20.  
  21.  */
  22.  
  23. #define PAGE_SIZE 0x1000        /* PAGE de 4K pour P_LINSWAP */
  24. union swap_header {
  25.   struct
  26.   {
  27.     char reserved[PAGE_SIZE - 10];
  28.     char magic[10];
  29.   } magic;
  30.   struct
  31.   {
  32.     char         bootbits[1024];    /* Space for disklabel etc. */
  33.     unsigned int version;
  34.     unsigned int last_page;
  35.     unsigned int nr_badpages;
  36.     unsigned int padding[125];
  37.     unsigned int badpages[1];
  38.   } info;
  39. };
  40.  
  41. int check_Linux_SWAP(t_param_disk *disk_car,t_diskext *partition,const int debug);
  42. int test_Linux_SWAP(t_param_disk *disk_car, const union swap_header *swap_header,t_diskext *partition,const int debug, const int dump_ind);
  43. int recover_Linux_SWAP(t_param_disk *disk_car, const union swap_header *swap_header,t_diskext *partition,const int debug, const int dump_ind);
  44.